In a fresh jEdit 5.5.0 install, openjdk 11.0.5 on Linux.
Steps to reproduce:
1. install Templates and XMLPlugin
2. XMLPlugin installs a template directory at startup
3. activate any one of them e.g. Plugins > Templates > XMLPlugin > xslt-2.0.vm
4. The first time nothing happens
5. The second time an exception is logged
{{{
[java] 22:39:25 [AWT-EventQueue-0] [error] TemplatesPlugin: Error processing template
'XMLPlugin/xslt-2.0.vm'
[java] 22:39:25 [AWT-EventQueue-0] [error] TemplatesPlugin: java.lang.NullPointerException
[java] 22:39:25 [AWT-EventQueue-0] [error] TemplatesPlugin: at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:294)
}}}
Submitted | kerik-sf - 2019-12-11 21:41:47.787000 | Assigned | |
---|---|---|---|
Priority | 5 | Labels | |
Status | open | Group | |
Resolution | None |
2019-12-11 21:45:56.146000 kerik-sf |
- Description has changed: |
---|---|
2019-12-12 01:40:05.019000 conal_tuohy |
Thanks for opening the issue, Eric. I can just add that the problem is not specific to the XMLPlugin's templates, nor to XML files; my experience is that it occurs for any template, of any type. |
2019-12-12 03:39:26.683000 daleanson |
What version of Templates plugin? alternate (48.3Kio) |
2019-12-12 06:48:12.449000 kerik-sf |
This is with templates 5.0.1 |
2019-12-12 16:16:39.719000 daleanson |
Weird. I followed your steps and it works fine for me. Would you verify your versions
of oro, velocity, log4j, and jakartacommons, please?
|
2019-12-14 15:52:55.943000 kerik-sf |
commons-lang3-3.3.2.jar log4j-1.2.14.jar commons-logging-1.1.jar oro-2.0.8.jar commons-net-1.4.1.jar
velocity-1.7.jar commons-codec-1.3.jar commons-collections-3.2.jar JakartaCommons.jar
commons-httpclient-3.0.1.jar commons-io-2.4.jar
|
2019-12-14 15:57:18.041000 kerik-sf |
To be sure I deleted the settings (already created using pjo/ant) and installed only Templates: same result with a basic template, containing only the word HELLO in allcaps... |
2019-12-15 15:49:57.108000 daleanson |
Would you take a look at plugin bug [1882](https://sourceforge.net/p/jedit/plugin-bugs/1882/) There are two exceptions in the log files attached to that ticket, the second one is the same as the one you're seeing. Are you also seeing the first one? |
2019-12-16 07:46:01.417000 kerik-sf |
I don't get the NoClassDefFoundError, but nothing happens the first time I insert a template. Maybe the exception is silently discarded at some point... called_templates_twice.log (12.5Kio) |
2019-12-16 07:49:49.437000 kerik-sf |
- Description has changed: |
2019-12-16 07:49:51.591000 kerik-sf |
moving the stacktrace to an attachment |
2019-12-16 15:20:49.564000 daleanson |
Okay, I figured out why it works for me and not for you -- I still have a copy of commons-lang-2.6.jar in my ~/.jedit/jars folder. I think this is from a previous version of Jakarta Commons. It has the StringUtils class that the version of Velocity included with the Templates plugin needs. I guess there are a couple of ways to fix this, either update the Templates plugin to use a new version of Velocity and associated libraries, or include the older commons-lang-2.6.jar with Templates. |